<template>
  <div
    class="jy-style-height copyright-box"
    :style="{
      background: `rgba(33, 33, 33, 1) url(${
        publicUrls + 'free/style2/publicStyle1Bg.png' + '?imageView2/3/format/webp'
      })`,
    }"
  >
    <div class="cultural-bg">
      <div class="copyright-heard">
        <i class="freeIcon" @click="blankHome">&#xe642;</i>
        <span>版权声明</span>
      </div>
      <div class="copyright-content">
        <scrollBox
          color="rgba(33, 35, 38, 0.6)"
          v-if="Scrollheights"
          :remarks="commonStore.copyrightInfo"
          :byid="234"
          :height="getScrollWComputed"
        >
          <template #solidBorder>
            <div class="solidBorder-child"></div>
          </template>
        </scrollBox>
      </div>
      <div class="content-door">
        <i class="iconfonts">&#xe6dd;</i>
        <span>永不落幕的展览与展示平台</span>
      </div>
    </div>
    <MenuNavigation />
  </div>
</template>

<script lang="ts">
export default defineComponent({
  name: 'style2',
});
</script>

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
import { defineComponent, nextTick, ref, computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const commonStore = commonDataStore();
const store = useProjectStore();
const router = useRouter();
const route = useRoute();
const content = ref(null);
const Scrollheights = ref();

let viewportHeight = window.innerHeight;
Scrollheights.value = viewportHeight * 0.5388;
const getScrollWComputed = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights = (fontSizeNumber / 144) * 635;
  return heights;
});
const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
</script>

<style scoped lang="less">
.copyright-box {
  width: 100%;
  padding: 0 84px;
  padding-bottom: 0px;
  background-size: contain !important;
  background-repeat: repeat !important;
  background-position: center !important;
}
.cultural-bg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(153, 185, 182, 1);
  padding-top: 60px;
  position: relative;
}
.copyright-heard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 60px;
  span {
    font-family: ZKTSHIKTS--GB1, ZKTSHIKTS--GB1;
    font-size: 32px;
    color: #212326;
    line-height: 32px;
    background: #ffdc76;
    border-top: 1px solid #212326;
    border-bottom: 1px solid #212326;
  }
  .freeIcon {
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 60px;
    transform: translate(0, -50%);
    font-size: 24px;
    line-height: 32px;
    color: rgba(50, 43, 37, 1);
  }
}
.content-door {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 60%;
  position: absolute;
  bottom: 0;
  .iconfonts {
    font-size: 26px;
    color: rgba(255, 255, 255, 1);
    margin-bottom: 4px;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    color: rgba(255, 255, 255, 1);
    margin-left: 20px;
    padding-bottom: 7px;
  }
}
.copyright-content {
  flex: 1;
  height: 560px;
  padding: 0px 60px;
}
.copyrightInfo {
  width: 100%;
  height: 100%;
}

.solidBorder-child {
  width: 2px;
  height: 100%;
  background: #5b8c87;
  border-radius: 1px;
  opacity: 0.4;
}
::v-deep .templatestyle1-scroll-box-tumb {
  align-items: center;
  justify-content: center;
  top: -5px;
}
::v-deep .unit-exbi-remarks-info-remarks {
  p {
    opacity: 0.6;
    font-size: 16px;
    font-weight: normal;
  }
}
</style>